package models;
import java.util.*;

import javax.persistence.*;

import play.data.validation.MaxSize;
import play.data.validation.Required;
import play.db.jpa.*;
 
@Entity
public class Ville extends Model
{
	@Required
	@MaxSize(50)	
	public String nom_ville;
	
	@Required
	@ManyToOne
	public Coordonnee coordonnee;

	public Ville(String nom_ville, Coordonnee coordonnee) 
	{
		this.nom_ville = nom_ville;
		this.coordonnee = coordonnee;
	}
	
	public String toString()
	{
		return this.nom_ville;
	}
}
